package com.example.blog.service;

import com.example.blog.entity.Blog;
import com.example.blog.entity.User;
import com.example.blog.mapper.BlogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BlogService {
    @Autowired
    private BlogMapper blogMapper;
    public List<Blog> selectAll() {
        return blogMapper.selectAll();
    }
    public Blog selectById(Integer blogid) {
        return blogMapper.selectById(blogid);
    }
    public int add(Blog blog) {
        return blogMapper.addBlog(blog);
    }
    public int upBlog(Blog blog) {
        return blogMapper.upBlog(blog);
    }
    public void delBlog(Integer blogid) {
        blogMapper.delBlog(blogid);
    }
}
